package com.ruoyi.user.service.impl;

import com.ruoyi.user.domain.User;
import com.ruoyi.user.mapper.UserMapper;
import com.ruoyi.user.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements IUserService {

    @Resource
    UserMapper userMapper;


    @Override
    public Long getLogin(User user) {
        return userMapper.getLogin(user);
    }

    @Override
    public User getUserByPhone(User user) {
        return userMapper.getUserByPhone(user);
    }

    @Override
    public User getUserByUserId(Long userId) {
        return userMapper.getUserByUserId(userId);
    }

    @Override
    public int updatePassword(User user) {
        return userMapper.updatePassword(user);
    }

    @Override
    public int insertUser(User user) {
        return userMapper.insertUser(user);
    }

    @Override
    public int updateUserName(User user) {
        return 0;
    }

    @Override
    public User getById(Long userId) {
        return userMapper.getById(userId);
    }
}
